﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="inlineOrder.aspx.cs" Inherits="WebSite.crm.order.GoodsOutDetail" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>福利点点通 </title>
      <style>
      a{ color:#E18325;}
    </style>
         <script src="/crm/js/common.js" type="text/javascript"></script>
              <script language="javascript" type="text/javascript">

                  function openModelWindow() {



                      var code = document.getElementById("extForm1_ctl07_hdOrderCode").value;
                    
                          X('Window1').box_show('/crm/order/selectGoodsList.aspx?code=' + code , '选择商品');
                     
                  }
     </script>
   
</head>
<body>
    <form id="form1" runat="server">
    <div class="maincontent">
                       
      <ext:PageManager ID="PageManager1" runat="server" />  
        <ext:form ID="extForm1" runat="server" BodyPadding="5px" 
            EnableBackgroundColor="true" Title="" ShowHeader="false" >
            <Rows>
              <ext:FormRow>
               <Items>
                <ext:Label ID="lblGoodsName" runat="server"></ext:Label>
               </Items>
              </ext:FormRow>

                <ext:FormRow ColumnWidths="50% 50%">
                <Items>
                   <ext:DropDownList ID="ddlCompanyList" Label="供货商" Required="true" ShowRedStar="true" CompareOperator="NotEqual" CompareValue="-1" runat="server"></ext:DropDownList>
                     <ext:DropDownList ID="ddlBuyCompanyList" Label="进货商" Required="true" 
                        ShowRedStar="true" CompareOperator="NotEqual" CompareValue="-1" runat="server"   AutoPostBack="true"
                        OnSelectedIndexChanged="ddlBuyCompanyList_SelectedIndexChanged"></ext:DropDownList>
                </Items>
            </ext:FormRow>
                   <ext:FormRow>
                      <Items>
                      <ext:LinkButton    ID="btnSelectGoods" runat="server" OnClientClick="openModelWindow();"   EnablePostBack="false" Text="选择要订购的商品" ></ext:LinkButton>
                      </Items>
                   </ext:FormRow>
            <ext:FormRow>
             <Items>
                  <ext:Grid ID="Grid1" Title="商品列表" PageSize="50" ShowBorder="false"  
                  CssClass="x-form-item"  Height="150px"  AllowPaging="false" 
                  SortColumn="goodsName" SortDirection="ASC"     
                                ShowHeader="false" runat="server" 
                  EnableCheckBoxSelect="false"   AllowSorting="true"    IsDatabasePaging="false" 
                                DataKeyNames="goodsId" OnSort="Grid1_Sort" 
                  EnableRowNumber="True" onrowcommand="Grid1_RowCommand">
                <Columns>
                      <ext:BoundField Width="160" ColumnID="goodsCode" SortField="goodsCode" DataField="goodsCode" DataFormatString="{0}"
                            HeaderText="商品编号" />
                       <ext:BoundField Width="260px" ColumnID="goodsName" SortField="goodsName" DataField="goodsName" DataFormatString="{0}"
                            HeaderText="商品名称" />
                       <ext:BoundField Width="100px" ColumnID="goodsPrice" SortField="goodsPrice" DataField="goodsPrice" DataFormatString="{0}"
                            HeaderText="零售价" />
                      <ext:BoundField Width="100px" ColumnID="onSale" SortField="onSale" DataField="onSale" DataFormatString="{0}"
                            HeaderText="折扣" />
                       <ext:BoundField Width="100px" ColumnID="costPrice" SortField="costPrice" DataField="costPrice" DataFormatString="{0}"
                            HeaderText="进货价" />
                         <ext:BoundField Width="100px" ColumnID="goodsCount" SortField="goodsCount" DataField="goodsCount" DataFormatString="{0}"
                            HeaderText="进货数量" />
                      <ext:BoundField Width="100px" ColumnID="sumGoodsOrderPrice" SortField="sumGoodsOrderPrice" DataField="sumGoodsOrderPrice" DataFormatString="{0}"
                            HeaderText="总进货价" />
                    <ext:WindowField Width="60px" WindowID="Window2" HeaderText="" Text="修改数量"   ToolTip="修改数量" DataIFrameUrlFields="goodsId,orderCode"
                                DataIFrameUrlFormatString="orderGoodsCountEdit.aspx?gid={0}&code={1}" Title="修改数量"
                                IFrameUrl="~/alert.aspx" />
                   <ext:LinkButtonField ConfirmText="你确定要删除吗？" ConfirmTarget="Top" ColumnID="lbfDeleted"
                            Width="50px" CommandName="deleted" Text="删除" />



                </Columns>
            </ext:Grid>
             </Items>
            </ext:FormRow>

              <ext:FormRow ColumnWidths="50% 50%">
                <Items>
                 <ext:textbox ID="txtLinker"   Required="true" ShowRedStar="True"  Label="联系人" runat="server" Text=""></ext:textbox>
                    <ext:textbox ID="txtLinkerPhone"   Required="true" ShowRedStar="True"  Label="联系人电话" runat="server" Text=""></ext:textbox>
                </Items>
            </ext:FormRow>
              <ext:FormRow ColumnWidths="100%">
                <Items>
                    <ext:textbox ID="txtSendAddress"   Required="true" ShowRedStar="True"  Label="送货地址" runat="server" Text=""></ext:textbox>
                </Items>
                  </ext:FormRow>       
        
               <ext:FormRow ColumnWidths="100%">
                <Items>
                    <ext:textbox ID="txtRemark"   Required="true" ShowRedStar="True"  Label="备注" runat="server" Text=""></ext:textbox>
               
                </Items>

                  </ext:FormRow>
                 <ext:FormRow ColumnWidths="50% 50%">
                <Items>
          
                      <ext:button runat="server" Text="保 存" ValidateForms="extForm1"  ID="btnSubmitForm1"   Type="Submit"   OnClick="btnSubmitForm1_Click">
                       </ext:button>
                       <ext:HiddenField ID="hdOrderCode" runat="server" Text=""></ext:HiddenField>

                </Items>
            </ext:FormRow>
            </Rows>
        </ext:form>
 
          
    </div>

      <ext:Window ID="Window1" Title="选择商品" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"   CloseAction="HidePostBack" IsModal="true" Width="800px"
        EnableConfirmOnClose="true"  OnClose="Window1_Close" Height="420px">
    </ext:Window>

          <ext:Window ID="Window2" Title="修改商品数量" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"   CloseAction="HidePostBack" IsModal="true" Width="240px"
        EnableConfirmOnClose="true"  OnClose="Window2_Close" Height="100px">
    </ext:Window>
    </form>
</body>
</html>
